<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
        #spinner {
            margin: 200px;
            border: 1px solid #ddd;
            text-align: center;
            padding: 90px 0;
        }
        span{
            height: 30px;
            width: 3px;
            background-color: #d7d7d7;
            display: inline-block;
            margin-right: 1px;
            animation:loading 1.2s ease-in-out infinite;
        }
        
        @keyframes loading{
            0%{
                transform: scaleY(0.4);
            }
            50%{
                transform: scaleY(1);
            }
            100%{
                transform: scaleY(0.4);
            }
        }
        @-webkit-keyframes loading{
            0%{
                transform: scaleY(0.4);
            }
            50%{
                transform: scaleY(1);
            }
            100%{
                transform: scaleY(0.4);
            }
        }
        /* 巧用 animation-delay 延迟加载动画 */
        .line7{
            animation-delay: -0.0s;
        }
        .line6{
            animation-delay: -0.2s;
        }
        .line5{
            animation-delay: -0.4s;
        }
        .line4{
            animation-delay: -0.6s;
        }
        .line3{
            animation-delay: -0.8s;
        }
        .line2{
            animation-delay: -1.0s;
        }
    </style>
</head>

<body>
    <div id="spinner">
        <span class="line1"></span>
        <span class="line2"></span>
        <span class="line3"></span>
        <span class="line4"></span>
        <span class="line5"></span>
        <span class="line6"></span>
        <span class="line7"></span>
    </div>
</body>

</html>